home *** CD-ROM | disk | FTP | other *** search
- /* MaxApplZone.c */
-
- /* MaxApplZone XFCN for HyperCard
- with LightSpeedC v. 3.01 - 11/2/88
- Copyright 1988 by
- Returns the number of KB free space in Sam Thornton
- the HyperCard application heap and/or PO Box 123
- compacts the application heap. Fairfield NE 68938
- Some portions Copyright
- by Symantec and Apple.
- See MaxApplZone.docs for user interface
- Compuserve: 71750,667
- GEnie: S.THORNTON5
-
- NOTE: All 'StringPtr' types in May be copied and
- HyperXCmd.h and glue should distributed for personal
- be dereferenced to type 'Ptr' use without charge only,
- for this to compile properly. except for nominal
- distribution fees. For
- commercial use or
- distribution, contact
- author, above. */
- #include "HyperXCmd.h"
- #include "SetUpA4.h"
- #include "MemoryMgr.h"
- #include "unix.h"
-
- typedef struct trade_mark {
- char mk[90];
- } trade_mark;
-
- trade_mark mrk = {" MaxApplZone XFCN v1.0 Copyright 1988 by Sam Thornton * PO Box 123 * Fairfield NE 68938 "};
-
- pascal void main (paramPtr)
- XCmdBlockPtr paramPtr;
- {
- Size grow;
- int mem_size;
-
- RememberA0();
- SetUpA4();
-
- if (paramPtr->paramCount >= 1) { /* if any params, compact memory */
- MaxMem(&grow);
- MaxApplZone();
- }
- mem_size = (TheZone->zcbFree) / 1024;
- paramPtr->returnValue = NewHandle(10);
- stci_d(*paramPtr->returnValue,mem_size,9);
-
- RestoreA4();
- return;
- }